<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM WebSphere Studio">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="css/tigris.css" rel="stylesheet"
	type="text/css">
<TITLE>How to find suspect cut and paste code</TITLE>
</HEAD>
<BODY>
<DIV class="app">
<DIV class="h3">
	<H3>How to find suspect cut and paste code</H3>
	<P>
	PMD comes with a usefull feature called CPD. CPD stands for Cut and Paste Detector.
	It's a tool that scan a set of files and look for suspect code replicas.
	</P>
	<P>
	To check the files of a project, simply select "Find Suspect Cut And Paste" on the
	project context menu. After scanning, a report window will be displayed indicating
	if duplicate code has been found and where.
	</P>
	<P>
	CPD can be parameterized by the minimum size of the replica. To specify this parameter,
	open the workbench preferences dialog and select the PMD->CPD Preferences category.
	In the "Minimum tile size" entry field, enter the size specified in number of lines.
	</P>
</DIV>
</DIV>
</BODY>
</HTML>
